<div id="sidebar">
                                <!--

            	<div class="b-support">
                	<ul class="s-yahoo">
                		<?php if(isset($support) && $support != null) {?>
                		<?php foreach($support as $k => $v) {?>
                    	<li>
                        	<span class="left">Hỗ trợ bán hàng <?php echo $k == 0 ? 1 : $k + 1;?></span>
                            <span class="right">
                            	<a href="ymsgr:sendim?<?php echo $v->yahoo;?>" title="<?php echo $v->yahoo;?>">	                            	
                            		<img src="http://opi.yahoo.com/online?u=<?php echo $v->yahoo;?>&t=1" title="Chat với <?php echo $v->yahoo;?>" alt="Chat với <?php echo $v->yahoo;?>" />
                            	</a>
                            </span>
                        </li>
                        <?php }?>                        
                        <?php }?>
                    </ul>
                </div>
                <div class="b-sidebar">
                	<h2>Chọn Thương hiệu</h2>
                    <ul class="thuonghieu">
                    	<?php if(isset($company) && $company != null) {?>
                    		<?php foreach($company as $k => $v) {?>
                    			<li>
                    				<a href="<?php echo base_url().'gian-hang/company/'.$v->name_link.'.html'?>" title="<?php echo $v->name;?>"><?php echo $v->name;?></a> 
                    				<?php $total_products = $this->home_model->count_product_by_company($v->id);?>
                    				<font class="number">(<?php echo $total_products[0]->sum_products;?>)</font>
                    			</li>                        
                        	<?php }?>
                        <?php }?>
                    </ul>
                </div>
                -->
                <div class="b-sidebar">
                	<h2>Chọn theo giá</h2>
                    <ul class="price">
                    	<li>
                    		<a href="<?php echo base_url().'gian-hang/price_max/0-5.html'?>">Dưới 5 triệu</a>
                    		<?php $total_products = $this->home_model->count_all_products_by_price(0,5);?> 
                    		(<?php echo $total_products[0]->sum_products;?>)
                    	</li>
                        <li>
                        	<a href="<?php echo base_url().'gian-hang/price_max/5-7.html'?>">5 triệu - 7 triệu</a> 
                        	<?php $total_products = $this->home_model->count_all_products_by_price(5,7);?> 
                    		(<?php echo $total_products[0]->sum_products;?>)
                        </li>
                        <li>
                        	<a href="<?php echo base_url().'gian-hang/price_max/7-10.html'?>">7 triệu - 10 triệu </a> 
                        	<?php $total_products = $this->home_model->count_all_products_by_price(7,10);?> 
                    		(<?php echo $total_products[0]->sum_products;?>)
                        </li>
                        <li>
                        	<a href="<?php echo base_url().'gian-hang/price_max/10-12.html'?>">10 triệu - 12 triệu</a> 
                        	<?php $total_products = $this->home_model->count_all_products_by_price(10,12);?> 
                    		(<?php echo $total_products[0]->sum_products;?>)
                        </li>
                        <li>
                        	<a href="<?php echo base_url().'gian-hang/price_max/12-0.html'?>">Trên 12 triệu </a> 
                        	<?php $total_products = $this->home_model->count_all_products_by_price(12,0);?> 
                    		(<?php echo $total_products[0]->sum_products;?>)
                        </li>
                        <li class="other"><b>Hoặc điền giá cần tìm</b></li>
                        
                        <li class="other">
                        	<span>Từ</span><input type="text" name="from_prices" id="from_prices" value="" style="width:110px;" class="text" /><span>Triệu</span>
                        </li>
                        <li class="other">
                        	<span>Đến</span><input type="text" name="to_prices" id="to_prices" value="" style="width:110px;" class="text" /><span>Triệu</span>
                        </li>
                        <li class="other">
                        	<span>&nbsp;</span><input type="submit" name="" onclick="filter_price()" class="button" value="Lọc tìm" />
                        </li>
                    </ul>
                </div>
                
                <script type="text/javascript">
                function filter_price()
                {
                	from_price		=	$("#from_prices").val();	
                	to_price		=	$("#to_prices").val();	
                	window.location.href='<?php echo base_url().'gian-hang/price_max/';?>'+from_price+'-'+to_price+'.html';
                }
                </script>
                
                <div class="b-sidebar">
                	<h2>Công năng sử dụng</h2>
                    <ul class="price">
                    <?php if(isset($utilities) && $utilities != null) {?>
                    <?php foreach($utilities as $k => $v) {?>
                    	<li>
                    		<a href="<?php echo base_url().'gian-hang/su-dung/'.$v->name_link.'.html'?>" title="<?php echo $v->name;?>">
                    			<?php echo $v->name;?>
                    		</a>
                    		<?php $total_products = $this->home_model->count_products_by_utilities_id($v->id);?> 
                    			(<?php echo $total_products[0]->sum_products;?>)
                    	</li>
                        <?php }?>                        
                    <?php }?>
                    </ul>
                </div>
                
                <?php
					$file_newest = $this->home_model->get_table_price_newest();
					if(isset($file_newest) && count($file_newest)>0){ 
				?>
                		<div class="btn-download">
                				<a href="<?php echo download_link($file_newest->name_link);?>"><img src="<?php echo img_link('i-download.gif');?>" alt="" title="" /></a>
                		</div>
                <?php }?>
                
            </div>